home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIPersistentProperties2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  294 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPersistentProperties2.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPersistentProperties2_h__
  6. #define __gen_nsIPersistentProperties2_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIProperties_h__
  14. #include "nsIProperties.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsISimpleEnumerator_h__
  18. #include "nsISimpleEnumerator.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. class nsIInputStream; /* forward declaration */
  26.  
  27. class nsIOutputStream; /* forward declaration */
  28.  
  29.  
  30. /* starting interface:    nsIPropertyElement */
  31. #define NS_IPROPERTYELEMENT_IID_STR "283ee646-1aef-11d4-98b3-00c04fa0ce9a"
  32.  
  33. #define NS_IPROPERTYELEMENT_IID \
  34.   {0x283ee646, 0x1aef, 0x11d4, \
  35.     { 0x98, 0xb3, 0x00, 0xc0, 0x4f, 0xa0, 0xce, 0x9a }}
  36.  
  37. class NS_NO_VTABLE nsIPropertyElement : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROPERTYELEMENT_IID)
  41.  
  42.   /* attribute AUTF8String key; */
  43.   NS_IMETHOD GetKey(nsACString & aKey) = 0;
  44.   NS_IMETHOD SetKey(const nsACString & aKey) = 0;
  45.  
  46.   /* attribute AString value; */
  47.   NS_IMETHOD GetValue(nsAString & aValue) = 0;
  48.   NS_IMETHOD SetValue(const nsAString & aValue) = 0;
  49.  
  50. };
  51.  
  52. /* Use this macro when declaring classes that implement this interface. */
  53. #define NS_DECL_NSIPROPERTYELEMENT \
  54.   NS_IMETHOD GetKey(nsACString & aKey); \
  55.   NS_IMETHOD SetKey(const nsACString & aKey); \
  56.   NS_IMETHOD GetValue(nsAString & aValue); \
  57.   NS_IMETHOD SetValue(const nsAString & aValue); 
  58.  
  59. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  60. #define NS_FORWARD_NSIPROPERTYELEMENT(_to) \
  61.   NS_IMETHOD GetKey(nsACString & aKey) { return _to GetKey(aKey); } \
  62.   NS_IMETHOD SetKey(const nsACString & aKey) { return _to SetKey(aKey); } \
  63.   NS_IMETHOD GetValue(nsAString & aValue) { return _to GetValue(aValue); } \
  64.   NS_IMETHOD SetValue(const nsAString & aValue) { return _to SetValue(aValue); } 
  65.  
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  67. #define NS_FORWARD_SAFE_NSIPROPERTYELEMENT(_to) \
  68.   NS_IMETHOD GetKey(nsACString & aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKey(aKey); } \
  69.   NS_IMETHOD SetKey(const nsACString & aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKey(aKey); } \
  70.   NS_IMETHOD GetValue(nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  71.   NS_IMETHOD SetValue(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); } 
  72.  
  73. #if 0
  74. /* Use the code below as a template for the implementation class for this interface. */
  75.  
  76. /* Header file */
  77. class nsPropertyElement : public nsIPropertyElement
  78. {
  79. public:
  80.   NS_DECL_ISUPPORTS
  81.   NS_DECL_NSIPROPERTYELEMENT
  82.  
  83.   nsPropertyElement();
  84.  
  85. private:
  86.   ~nsPropertyElement();
  87.  
  88. protected:
  89.   /* additional members */
  90. };
  91.  
  92. /* Implementation file */
  93. NS_IMPL_ISUPPORTS1(nsPropertyElement, nsIPropertyElement)
  94.  
  95. nsPropertyElement::nsPropertyElement()
  96. {
  97.   /* member initializers and constructor code */
  98. }
  99.  
  100. nsPropertyElement::~nsPropertyElement()
  101. {
  102.   /* destructor code */
  103. }
  104.  
  105. /* attribute AUTF8String key; */
  106. NS_IMETHODIMP nsPropertyElement::GetKey(nsACString & aKey)
  107. {
  108.     return NS_ERROR_NOT_IMPLEMENTED;
  109. }
  110. NS_IMETHODIMP nsPropertyElement::SetKey(const nsACString & aKey)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* attribute AString value; */
  116. NS_IMETHODIMP nsPropertyElement::GetValue(nsAString & aValue)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120. NS_IMETHODIMP nsPropertyElement::SetValue(const nsAString & aValue)
  121. {
  122.     return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124.  
  125. /* End of implementation class template. */
  126. #endif
  127.  
  128.  
  129. /* starting interface:    nsIPersistentProperties */
  130. #define NS_IPERSISTENTPROPERTIES_IID_STR "1a180f60-93b2-11d2-9b8b-00805f8a16d9"
  131.  
  132. #define NS_IPERSISTENTPROPERTIES_IID \
  133.   {0x1a180f60, 0x93b2, 0x11d2, \
  134.     { 0x9b, 0x8b, 0x00, 0x80, 0x5f, 0x8a, 0x16, 0xd9 }}
  135.  
  136. class NS_NO_VTABLE nsIPersistentProperties : public nsIProperties {
  137.  public: 
  138.  
  139.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPERSISTENTPROPERTIES_IID)
  140.  
  141.   /**
  142.    * load a set of name/value pairs from the input stream
  143.    * names and values should be in UTF8
  144.    */
  145.   /* void load (in nsIInputStream input); */
  146.   NS_IMETHOD Load(nsIInputStream *input) = 0;
  147.  
  148.   /**
  149.    * output the values to the stream - results will be in UTF8
  150.    */
  151.   /* void save (in nsIOutputStream output, in AUTF8String header); */
  152.   NS_IMETHOD Save(nsIOutputStream *output, const nsACString & header) = 0;
  153.  
  154.   /**
  155.    * call subclass() to make future calls to load() set the properties
  156.    * in this "superclass" instead
  157.    */
  158.   /* void subclass (in nsIPersistentProperties superclass); */
  159.   NS_IMETHOD Subclass(nsIPersistentProperties *superclass) = 0;
  160.  
  161.   /**
  162.    * get an enumeration of nsIPropertyElement objects,
  163.    * which are read-only (i.e. setting properties on the element will
  164.    * not make changes back into the source nsIPersistentProperties
  165.    */
  166.   /* nsISimpleEnumerator enumerate (); */
  167.   NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) = 0;
  168.  
  169.   /**
  170.    * shortcut to nsIProperty's get() which retrieves a string value
  171.    * directly (and thus faster)
  172.    */
  173.   /* AString getStringProperty (in AUTF8String key); */
  174.   NS_IMETHOD GetStringProperty(const nsACString & key, nsAString & _retval) = 0;
  175.  
  176.   /**
  177.    * shortcut to nsIProperty's set() which sets a string value
  178.    * directly (and thus faster)
  179.    */
  180.   /* AString setStringProperty (in AUTF8String key, in AString value); */
  181.   NS_IMETHOD SetStringProperty(const nsACString & key, const nsAString & value, nsAString & _retval) = 0;
  182.  
  183. };
  184.  
  185. /* Use this macro when declaring classes that implement this interface. */
  186. #define NS_DECL_NSIPERSISTENTPROPERTIES \
  187.   NS_IMETHOD Load(nsIInputStream *input); \
  188.   NS_IMETHOD Save(nsIOutputStream *output, const nsACString & header); \
  189.   NS_IMETHOD Subclass(nsIPersistentProperties *superclass); \
  190.   NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval); \
  191.   NS_IMETHOD GetStringProperty(const nsACString & key, nsAString & _retval); \
  192.   NS_IMETHOD SetStringProperty(const nsACString & key, const nsAString & value, nsAString & _retval); 
  193.  
  194. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  195. #define NS_FORWARD_NSIPERSISTENTPROPERTIES(_to) \
  196.   NS_IMETHOD Load(nsIInputStream *input) { return _to Load(input); } \
  197.   NS_IMETHOD Save(nsIOutputStream *output, const nsACString & header) { return _to Save(output, header); } \
  198.   NS_IMETHOD Subclass(nsIPersistentProperties *superclass) { return _to Subclass(superclass); } \
  199.   NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) { return _to Enumerate(_retval); } \
  200.   NS_IMETHOD GetStringProperty(const nsACString & key, nsAString & _retval) { return _to GetStringProperty(key, _retval); } \
  201.   NS_IMETHOD SetStringProperty(const nsACString & key, const nsAString & value, nsAString & _retval) { return _to SetStringProperty(key, value, _retval); } 
  202.  
  203. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  204. #define NS_FORWARD_SAFE_NSIPERSISTENTPROPERTIES(_to) \
  205.   NS_IMETHOD Load(nsIInputStream *input) { return !_to ? NS_ERROR_NULL_POINTER : _to->Load(input); } \
  206.   NS_IMETHOD Save(nsIOutputStream *output, const nsACString & header) { return !_to ? NS_ERROR_NULL_POINTER : _to->Save(output, header); } \
  207.   NS_IMETHOD Subclass(nsIPersistentProperties *superclass) { return !_to ? NS_ERROR_NULL_POINTER : _to->Subclass(superclass); } \
  208.   NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(_retval); } \
  209.   NS_IMETHOD GetStringProperty(const nsACString & key, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStringProperty(key, _retval); } \
  210.   NS_IMETHOD SetStringProperty(const nsACString & key, const nsAString & value, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringProperty(key, value, _retval); } 
  211.  
  212. #if 0
  213. /* Use the code below as a template for the implementation class for this interface. */
  214.  
  215. /* Header file */
  216. class nsPersistentProperties : public nsIPersistentProperties
  217. {
  218. public:
  219.   NS_DECL_ISUPPORTS
  220.   NS_DECL_NSIPERSISTENTPROPERTIES
  221.  
  222.   nsPersistentProperties();
  223.  
  224. private:
  225.   ~nsPersistentProperties();
  226.  
  227. protected:
  228.   /* additional members */
  229. };
  230.  
  231. /* Implementation file */
  232. NS_IMPL_ISUPPORTS1(nsPersistentProperties, nsIPersistentProperties)
  233.  
  234. nsPersistentProperties::nsPersistentProperties()
  235. {
  236.   /* member initializers and constructor code */
  237. }
  238.  
  239. nsPersistentProperties::~nsPersistentProperties()
  240. {
  241.   /* destructor code */
  242. }
  243.  
  244. /* void load (in nsIInputStream input); */
  245. NS_IMETHODIMP nsPersistentProperties::Load(nsIInputStream *input)
  246. {
  247.     return NS_ERROR_NOT_IMPLEMENTED;
  248. }
  249.  
  250. /* void save (in nsIOutputStream output, in AUTF8String header); */
  251. NS_IMETHODIMP nsPersistentProperties::Save(nsIOutputStream *output, const nsACString & header)
  252. {
  253.     return NS_ERROR_NOT_IMPLEMENTED;
  254. }
  255.  
  256. /* void subclass (in nsIPersistentProperties superclass); */
  257. NS_IMETHODIMP nsPersistentProperties::Subclass(nsIPersistentProperties *superclass)
  258. {
  259.     return NS_ERROR_NOT_IMPLEMENTED;
  260. }
  261.  
  262. /* nsISimpleEnumerator enumerate (); */
  263. NS_IMETHODIMP nsPersistentProperties::Enumerate(nsISimpleEnumerator **_retval)
  264. {
  265.     return NS_ERROR_NOT_IMPLEMENTED;
  266. }
  267.  
  268. /* AString getStringProperty (in AUTF8String key); */
  269. NS_IMETHODIMP nsPersistentProperties::GetStringProperty(const nsACString & key, nsAString & _retval)
  270. {
  271.     return NS_ERROR_NOT_IMPLEMENTED;
  272. }
  273.  
  274. /* AString setStringProperty (in AUTF8String key, in AString value); */
  275. NS_IMETHODIMP nsPersistentProperties::SetStringProperty(const nsACString & key, const nsAString & value, nsAString & _retval)
  276. {
  277.     return NS_ERROR_NOT_IMPLEMENTED;
  278. }
  279.  
  280. /* End of implementation class template. */
  281. #endif
  282.  
  283. //{283EE645-1AEF-11D4-98B3-00C04fA0CE9A}
  284. #define NS_IPROPERTYELEMENT_CID \
  285. {    0x283ee645, 0x1aef, 0x11d4, \
  286.   { 0x98, 0xb3, 0x0, 0xc0, 0x4f, 0xa0, 0xce, 0x9a } }
  287. #define NS_IPERSISTENTPROPERTIES_CID \
  288. { 0x2245e573, 0x9464, 0x11d2, \
  289.   { 0x9b, 0x8b, 0x0, 0x80, 0x5f, 0x8a, 0x16, 0xd9 } }
  290. #define NS_PERSISTENTPROPERTIES_CONTRACTID "@mozilla.org/persistent-properties;1"
  291. #define NS_PERSISTENTPROPERTIES_CLASSNAME "Persistent Properties"
  292.  
  293. #endif /* __gen_nsIPersistentProperties2_h__ */
  294.